package com.bwie.parkdemo.mvvm.model;

import com.bwie.lib_core.base.BaseEntity;
import com.bwie.parkdemo.mvvm.model.entity.AddRepairEntity;
import com.bwie.parkdemo.mvvm.model.entity.AddRepairImgEntity;
import com.bwie.parkdemo.mvvm.model.entity.AddSysParkingEntity;
import com.bwie.parkdemo.mvvm.model.entity.AddVisitorEntity;
import com.bwie.parkdemo.mvvm.model.entity.AppointDepartmentEntity;
import com.bwie.parkdemo.mvvm.model.entity.AppointRepairEntity;
import com.bwie.parkdemo.mvvm.model.entity.CarColorEntity;
import com.bwie.parkdemo.mvvm.model.entity.CarEntity;
import com.bwie.parkdemo.mvvm.model.entity.CarImgEntity;
import com.bwie.parkdemo.mvvm.model.entity.DepartmentEntity;
import com.bwie.parkdemo.mvvm.model.entity.DepartmentUserEntity;
import com.bwie.parkdemo.mvvm.model.entity.GroupEntity;
import com.bwie.parkdemo.mvvm.model.entity.HistorySignEntity;
import com.bwie.parkdemo.mvvm.model.entity.LoginEntity;
import com.bwie.parkdemo.mvvm.model.entity.ParkingAllEntity;
import com.bwie.parkdemo.mvvm.model.entity.PatrolEntity;
import com.bwie.parkdemo.mvvm.model.entity.PatrolesEntity;
import com.bwie.parkdemo.mvvm.model.entity.PointEntity;
import com.bwie.parkdemo.mvvm.model.entity.RepairEntity;
import com.bwie.parkdemo.mvvm.model.entity.RepairUserEntity;
import com.bwie.parkdemo.mvvm.model.entity.SelAllApplyEntity;
import com.bwie.parkdemo.mvvm.model.entity.SelVisitorValuesEntity;
import com.bwie.parkdemo.mvvm.model.entity.SysSignEntity;
import com.bwie.parkdemo.mvvm.model.entity.UploadImgsEntity;
import com.bwie.parkdemo.mvvm.model.entity.VisitorEntity;
import com.bwie.parkdemo.mvvm.model.entity.VisitorValuesEntity;

import java.util.List;

import io.reactivex.Observable;
import io.reactivex.Observer;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

/**
 * 存放retrofit请求抽象方法
 * */
public interface Api {

    //用户登录接口
    @POST("sysUser/loginUser")
    Observable<LoginEntity>requestLogin(@Body RequestBody body);
    //全部车位接口
    @POST("sysParking/selParking")
    Observable<ParkingAllEntity>requestParkingAll();
    //获取车辆颜色
    @POST("sysColor/selColor")
    Observable<CarColorEntity>requestCarColor();
    //全部图片上传
    @Multipart
    @POST("fileUpload")
    Observable<UploadImgsEntity>uploadIms(@Part List<MultipartBody.Part>list);
    @POST("sysCar/addCar")
    Observable<CarEntity>requestAddCar(@Body RequestBody body);
    @POST("sysCar/addCarImg")
    Observable<CarImgEntity>requestCarImgs(@Body RequestBody body);
    //添加车位申请到服务器
    @POST("sysParking/applyParking")
    Observable<AddSysParkingEntity>requestAddSysParking(@Body RequestBody body);
    //全部来访申请列表
    @POST("sysVisitor/selVisitor")
    Observable<VisitorEntity>requestSelVisitor(@Body RequestBody body);
    //来访申请详情页
    @POST("sysVisitor/valuesVisitor")
    Observable<VisitorValuesEntity>requestVisitorValues(@Body RequestBody body);
    //添加来访申请接口
    @POST("sysVisitor/addVisitor")
    Observable<AddVisitorEntity>requestAddVisitorEntity(@Body RequestBody body);
    //删除来访申请接口
    @POST("sysVisitor/delVisitor")
    Observable<BaseEntity>requestDelVisitor(@Body RequestBody body);
    //修改来访申请接口
    //获取分组用户列表
    @POST("sysUser/selDepartmentUser")
    Observable<DepartmentUserEntity>requestSelDepartmentUser();
    //获取未分组用户列表
    @POST("sysUser/selUNDepartmentUser")
    Observable<DepartmentUserEntity>requestUNSelDepartmentUser();
    //获取全部部门列表
    @POST("sysDepartment/selDepartment")
    Observable<DepartmentEntity>requestDepartment(@Body RequestBody body);
    //指定用户部门接口
    @POST("sysUser/appointDepartmentUser")
    Observable<AppointDepartmentEntity>requestAppointDepartment(@Body RequestBody body);
    //添加维修申请接口
    @POST("sysRepair/addRepair")
    Observable<AddRepairEntity>requestAddRepair(@Body RequestBody body);
    //添加维修申请对应图片
    @POST("sysRepair/addRepairImg")
    Observable<AddRepairImgEntity>requestAddRepairImg(@Body RequestBody body);
    //获取全部维修列表数据
    @POST("sysRepair/selAllRepair")
    Observable<RepairEntity>requestRepair();
    //获取全部维修人列表数据
    @POST("sysRepair/selSysRepairUser")
    Observable<RepairUserEntity>requestRepairUser();
    //指定维修人数据
    @POST("sysRepair/selAppointRepair")
    Observable<AppointRepairEntity>requestAppointRepair(@Body RequestBody body);
    //添加巡逻点
    @POST("sysPatrol/addSysPoint")
    Observable<BaseEntity>requestAddPoint(@Body RequestBody body);
    //添加巡更路线
    @POST("sysPatrol/addPatrol")
    Observable<BaseEntity>requestAddPatrol(@Body RequestBody body);
    //查询全部巡逻点
    @POST("sysPatrol/selSysPoint")
    Observable<PointEntity>requestPointes();
    //查询全部分组
    @POST("sysPatrol/selGroup")
    Observable<GroupEntity>requestGroup();
    //查询全部巡更路线
    @POST("sysPatrol/selALLPatroles")
    Observable<PatrolesEntity>requestPatroles();
    //打卡接口
    @POST("sysPatrol/addPunch")
    Observable<BaseEntity>requestAddPunch(@Body RequestBody body);
    //签到接口POST /SysSign/startSign
    @POST("SysSign/startSign")
    Observable<SysSignEntity>requestStartSign(@Body RequestBody body);
    //签退接口POST /SysSign/endSign
    @POST("SysSign/endSign")
    Observable<SysSignEntity>requestEndSign(@Body RequestBody body);
    //日考勤
    @POST("SysSign/selDay")
    Observable<HistorySignEntity>requestDaySign();
    //月度考情明细
    @POST("SysSign/selMonth")
    Observable<HistorySignEntity>requestMonthSign(@Body RequestBody body);
    //全部申请列表接口
    @POST("sysApply/selAllApply")
    Observable<SelAllApplyEntity>requestSelAllApply(@Body RequestBody body);
    //访客申请详情接口
    @POST("sysApply/selVistorValue")
    Observable<SelVisitorValuesEntity>requestSelVistorValue(@Body RequestBody body);
}
